projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e60a38b
)
garmin_txt: Fix MSVC crash with timestamps lt zero.
author
oliskoli
<oliskoli>
Tue, 21 Aug 2007 21:05:53 +0000
(21:05 +0000)
committer
oliskoli
<oliskoli>
Tue, 21 Aug 2007 21:05:53 +0000
(21:05 +0000)
garmin_txt.c
patch
|
blob
|
history
diff --git
a/garmin_txt.c
b/garmin_txt.c
index a31e118154d623fe3463a52a0eb7365d4ecef67d..a8122ca1ce89474ca506131d9ed8ab6116c74bf0 100644
(file)
--- a/
garmin_txt.c
+++ b/
garmin_txt.c
@@
-358,6
+358,10
@@
print_date_and_time(const time_t time, const int time_only)
struct tm tm;
char tbuf[32];
+ if (time < 0) {
+ gbfprintf(fout, "\t");
+ return;
+ }
if (time_only) {
tm = *gmtime(&time);
snprintf(tbuf, sizeof(tbuf), "%d:%02d:%02d", tm.tm_hour, tm.tm_min, tm.tm_sec);